package davidlauzon.activerecord.nodes;

import davidlauzon.activerecord.visitor.SqlSerializer;


public class WhereClause extends Node
{
    /*********************************************************************************************
     * VARIABLES
     *********************************************************************************************/
    private String   _condition;
    private Object[] _unsafeValues;
    
    
    
    /*********************************************************************************************
     * SIMPLE GETTERS & SETTERS
     *********************************************************************************************/
    public String   getCondition()    { return _condition; }
    public Object[] getUnsafeValues() { return _unsafeValues; }
    
    public void setCondition(String condition) { _condition = condition; }
    public void setUnsafeValues(Object[] values) { _unsafeValues = values; }
    
    
    
    /*********************************************************************************************
     * PUBLIC METHODS
     *********************************************************************************************/
    public WhereClause(String condition, Object[] unsafeValues) {
        super();
        _condition    = condition;
        _unsafeValues = unsafeValues;
    }
    
    public WhereClause() {
        super();
    }

    @Override
    public String accept(SqlSerializer visitor) {
        return visitor.visit(this);
    }
}
